package com.uenpay.res;

import android.os.Environment;

/**
 * Created by PS on 2016/11/15.
 */
public class Constans {

    // 缓存目录
    public static final String APPDIR = Environment.getExternalStorageDirectory().toString() + "/oem";

    // 手机app版本 客户端版本
    public static final String clientVersion = android.os.Build.MODEL; // 获取手机系统版本
    public static final String appVersion = android.os.Build.VERSION.RELEASE;
    public static String checkVerName = "";
    public static String odanAppVersion = "";//o单App版本

    public static String sepreator = "/";
    public static String newline = "\n";
    public static String colon = ":";
    public static String yuan = "¥ ";
    public static String _yuan = "元";

    //极光推送
    public static boolean isForeground = false;
    //for receive customer msg from jpush server
    public static final String MESSAGE_RECEIVED_ACTION = "MESSAGE_RECEIVED_ACTION";
    public static final String KEY_TITLE = "title";
    public static final String KEY_MESSAGE = "message";
    public static final String KEY_EXTRAS = "extras";


    public static final String PHONE_TYPE = "1";//Android手机

    public interface PlatformType {
        String AMS = "ams/appPort";
        String RMS = "rms/appPort";
    }

    /**
     * 常用提示语
     */
    public static interface Prompt {
        String developing = "敬请期待";                // 登录用户
        String net_available = "网络不良，请检查网络";    // 网络不良
        String server_exception = "网络异常，请稍后再试";    // 服务器无响应

        String please_bind_pos = "请先绑定终端";            // 请先绑定终端
        String please_auth = "请先通过实名认证";        // 请先通过实名认证
        String please_bind_bankcard = "请先绑定提现卡";            // 请先绑定提现卡
        String please_upload_creditcard = "请先上传信用卡照片";        // 请先上传信用卡照片

        String verify_all_content = "请将信息填写完整";        // 信息
        String verify_phone = "请输入正确的手机号";        // 手机号

        String please_swipe_again = "请重新刷卡";        // 手机号
    }

    /**
     * 配置文件share类型
     */
    public static interface Share {
        String aishua = "aishua";        // aishua
        String phone = "phone";        // 登录用户
        String posType = "posType";    // 当前用户绑定的设备类型
        String WelcomeFirst = "WelcomeFirst";            // WelcomeFirst
        String PhoneChargeFirst = "PhoneChargeFirst";        // PhoneChargeFirst
        String RepayFirst = "RepayFirst";                // RepayFirst
        String TransferFirst = "TransferFirst";            // TransferFirst
        String QuickPayFirst = "QuickPayFirst";            // QuickPayFirst
        String DaybookFirst = "DaybookFirst";            // DaybookFirst
        String MicroShopFirst = "MicroShopFirst";            // DaybookFirst
        String JpushBroadcast = "JpushBroadcast";            // JpushBroadcast
        String GestureLockOn = "GestureLockOn";            // 手势密码开关
        String GestureTrailOn = "GestureTrailOn";            // 显示手势密码轨迹
        String LockPwd = "LockPwd";                // 手势密码
        String PassWord = "PassWord";                // 登录密码
        String CurUserName = "CurUserName";            // 登录名
        String LoginFlag = "LoginFlag";                        //登录后的标识
    }

    /**
     * 00--实名认证待审核(初始化默认状态），
     * 01--实名认证审核中、  02--实名认证已通过、 03--实名认证未通过、
     * 04--1级认证待审核中、05-1级认证审核通过、06--1级认证已未通过、
     * 07--2级认证待审核中、08-2级认证审核通过、09--3级认证已未通过、
     * 10--3级认证待审核中、11-3级认证审核通过、12--3级认证已未通过、
     */
    public static interface AuthState {
        /**
         * 00--您尚未实名认证
         */
        String no_auth = "00";
        /**
         * 01--实名认证审核中
         */
        String auth_review = "01";
        /**
         * 02--实名认证已通过
         */
        String auth_success = "02";
        /**
         * 03--实名认证未通过
         */
        String auth_fail = "03";
        /**
         * 04--1级认证审核中
         */
        String auth_1_review = "04";
        /**
         * 05--1级认证已通过
         */
        String auth_1_success = "05";
        /**
         * 06--1级认证未通过
         */
        String auth_1_fail = "06";
        /**
         * 07--2级认证审核中
         */
        String auth_2_review = "07";
        /**
         * 08--2级认证已通过
         */
        String auth_2_success = "08";
        /**
         * 09--2级认证未通过
         */
        String auth_2_fail = "09";
        /**
         * 10--3级认证审核中
         */
        String auth_3_review = "10";
        /**
         * 11--3级认证已通过
         */
        String auth_3_success = "11";
        /**
         * 12--3级认证未通过
         */
        String auth_3_fail = "12";
    }

    /**
     * 认证冻结的状态
     */
    public static interface FreezeState {
        String nor = "01";
        String freeze = "02";
        String unfreezing = "03";
        String completed = "04";
    }

    /**
     * 认证冻结的等级
     */
    public static interface FreezeLevelState {
        String auth_nor = "0";
        String auth_1 = "1";
        String auth_2 = "2";
        String auth_3 = "3";
    }

    /**
     * 银行卡类型 : 0 - 储蓄卡/借记卡, 1 - 信用卡
     */
    public static interface BankCardType {
        String debit_card = "0";
        String credit_card = "1";
    }

    /**
     * 银行卡类型 : 0 - 储蓄卡/借记卡, 1 - 信用卡
     */
    public static interface BankCardTypeString {
        String debit_card_string = "借记卡";
        String credit_card_string = "信用卡";
    }

    /**
     * 机具类型对应的显示在界面上的名称
     */
    public static interface PosName {
        String SKTPOS = "I21";                // SKTPOS
        String ICSKTPOS = "I21";                // ICSKTPOS
        String BlueBBposEmv = "M188";                // BlueBBposEmv | M188
        String BlueBBposPad = "M368";                // 带键盘的蓝牙BBpos|M368
        String BlueBBposPad_M380 = "M380";                // 带键盘的蓝牙BBpos|M368
        String BlueV27Emv = "P27";                // V刷动联 vp27
        String BlueP84Emv = "P84";                // V刷动联 p84

        String XPOSEMV = "Xpos";                // 芯片XPOS|MS1310
        String BPOSSmart = "Bpos";                // BBPOS-刷卡头（磁条）
        String NewLandEmv = "Newpos";                // 新大陆刷卡头
        String BBposEmv = "BBPOS-EMV";            // BBPOS-EMV
        String QPOS_3_0 = "UPOS";                // UPOS3.0
        String UPOS_New = "UPOS";            // UPOS_New
        String ZXBEmv = "ZXB";                //掌芯宝-蓝牙刷卡头
    }

    /**
     * 机具类型  跟后台名称对应
     */
    public static interface MachineType {
        String SKTPOS = "SKTPOS";        //SKTPOS
        String ICSKTPOS = "ICSKTPOS";        //ICSKTPOS
        String XPOS = "XPOS";        //XPOS
        String XPOSEMV = "芯片XPOS";    //芯片XPOS
        String BPOSSmart = "BBPOS-刷卡头";    //BBPOS-刷卡头（磁条）
        String BBposEmv = "BBPOS-EMV";    //BBPOS-EMV
        String NewLandEmv = "Newpos";        //新大陆刷卡头

        String BlueV27Emv = "V27";        // V刷动联 vp27
        String BlueV27Emv_NFC = "P27-NFC";        // p27带nfc
        String BlueP84Emv = "P84";        // 动联 p84
        String BlueP84Emv_NFC = "P84-NFC";     // 动联 p84 带nfc
        String BlueBBposEmv = "M188";        // BlueBBposEmv
        String BlueBBposPad = "M368";        // 带键盘的蓝牙BBpos
        String BlueBBposPad_M380 = "M380";        // 带键盘的蓝牙BBpos进阶版380
        String QPOS_3_0 = "UPOS_QPOS";    // UPOS3.0
        String UPOS_New = "UPOS_QPOS";    // UPOS_New
        String ZXBEmv = "ZXBEmv";        //掌芯宝-蓝牙刷卡头
    }

    /**
     * pos类型
     */
    public static interface PosType {
        String None = "None";        // 没有绑定，第一次登录

        String Spos = "Spos";        // SKTPOS|ICSKTPOS
        String Xpos = "Xpos";        // XPOS|芯片XPOS|MS1310
        String Bpos = "Bpos";        // BBPOS-刷卡头（磁条）
        String BBposEmv = "BBposEmv";    // BBPOS-EMV
        String NposEmv = "NposEmv";    // 新大陆刷卡头

        String BlueV27Emv = "BlueVpEmv";  // V刷动联 vp27
        String BlueP84Emv = "BlueP84Emv";  // 动联 p84
        String BlueBBposEmv = "IC_BBPOS";    // BlueBBposEmv | M188
        String BlueBBposPad = "M368";        // 带键盘的蓝牙BBpos|M368
        String BlueUpos = "BlueUpos";    // BlueUpos | 支付通-QPOS|QPOS3.0
        String ZXBEmv = "ZXBEmv";        //掌芯宝-蓝牙刷卡头
    }

    /**
     * 终端支持的交易类型 0表示只支持收款，1表示只支持闪付，2表示支持两种
     */
    public static interface TradeTypeSupport {
        String Receiver = "0";
        String QuickPay = "1";
        String Both = "2";
    }

    /**
     * pos sdk 消息 code
     */
    public static interface PosListenerCode {
        int code_Error = 9; // 通用错误
        int connect_P84 = 101; // 连接P84
        int connect_BBEmv = 102; // 连接M188 不带键盘的bbpos
        int connect_BBPad = 103; // 连接M368 带键盘bbpos
        int connect_Upos = 104; // 连接Upos
        int connect_P27 = 105; // 连接P27
    }

    /**
     * pos sdk 消息 msg
     */
    public static interface PosListenerMsg {
        /**
         * 刷卡设备没有被检测到
         */
        String msg_OnDeviceUnPresent = "OnDeviceUnPresent";
        /**
         * 刷卡设备没有被插入
         */
        String msg_OnDeviceUnPlug = "OnDeviceUnPlug";
        /**
         * 刷卡设备已插入
         */
        String msg_OnDevicePlug = "OnDevicePlug";
        String msg_onBTvConnected = "onBTvConnected";
        String msg_onBTvDisconnected = "onBTvDisconnected";
        String msg_onBTDeviceConnectedFailed = "onDeviceConnectedFailed";
        String msg_onBTvDeviceNotFound = "onBTvDeviceNotFound";
        String msg_onBTvScanStopped = "onBTvScanStopped";
        String msg_onBTvScanTimeout = "onBTvScanTimeout";
        String msg_getDeviceId = "getDeviceId";
        String msg_signInSuccess = "signInSuccess";
        String msg_OnWaitingOper = "OnWaitingOper";
        String msg_Dealing = "dealing";
        String msg_BBswipecard = "BBswipecard";
        String msg_Nswipecard = "Nswipecard";
        String msg_Xswipecard = "xswipecard";
        String msg_Bswipecard = "Bswipecard";
        String msg_BlueBBEmvswipecard = "BlueBBEmvswipecard";
        String msg_BlueBBPadswipecard = "BlueBBPadswipecard";
        String msg_BlueUposswipecard = "BlueUposswipecard";
        /**
         * 取消操作
         */
        String msg_BlueBBPadOperateCancel = "BlueBBPadDealingCancel";
        String msg_OperTimeOut = "操作超时";
        String msg_getDeviceIdFail = "未能获取到终端号";

        //P27连接
        String msg_blueV27EmvSwipeCard = "blueV27EmvSwipeCard";
        String msg_blueV27EmvScanStopped = "blueV27EmvScanStopped";
        //P84连接
        String msg_blueP84EmvSwipeCard = "bluep84EmvSwipeCard";
        String msg_bluep84EmvScanStopped = "bluep84EmvScanStopped";
        /**
         * zxb消息
         */
        String msg_zxbEmvSwipeSuccess = "zxbEmvSwipeSuccess";
        String msg_zxbEmvSwipeICSuccess = "zxbEmvSwipeICSuccess";
        String msg_zxbEmvICSuccess = "mag_zxbEmvICSuccess";
        String msg_zxbEmvswipecard = "zxbEmvswipecard";
        /**
         * P84连接
         */
        String msg_p84DirectConnect = "p84DirectConnect";
    }

    /**
     * 刷卡类型 : 1 - 普通pos, 2 - SKTPOS, 3 - UPos
     */
    public static interface POSTYPE_B {
        String normalPos = "1";
        String sktPos = "2";
        String UPos = "3";
    }

    /**
     * EventBus 组件通信码 code
     */
    public static interface EventCode {
        int code_Error = 0;        // 错误code
        int code_ForgetPwd = 1;        // 忘记密码
        int code_BindTerminal = 2;        // 绑定终端
        int code_BindBankCard = 3;        // 绑定银行卡
    }

    /**
     * RequestCode 请求返回code
     */
    public static interface RequestCode {
        String requset_success = "00";        //请求成功
        String requset_fail = "99";            // 请求失败
        String login_flag_invalidated = "100";        // 登录标识失效即被登录
        String long_time_operation = "101";        // 长时间未操作
    }

    /**
     * RequestCode 传递索引
     */
    public static interface IntentCode {
        String IS_SUCCESS = "isSuccess";  // 是否成功
        String RESULT = "result";        // 返回结果msg
        String CASH = "cash";        // 交易金额
    }

    /**
     * 账单排序
     */
    public static interface DayBookSort {
        int all = 0;        // 根据所有类型进行排序
        int filter = 1;        // 仅根据状态排序
        int type = 2;        // 仅根据类型排序
    }

    /**
     * 提现类型
     */
    public static interface TakeCashType {
        int fast = 1;        // 快速提现
        int normal = 2;        // 普通提现
    }

    /**
     * Image 选择途径
     */
    public static interface ImageSelectCode {
        int image_requst = 0;
        int camera_requst = 1;
        int image_cut_requst = 2;
    }

    /**
     * 账单列表交易类型
     */
    public static interface TradeTaype {
        //普通交易
        String NormalTrade = "01";
        //T+N
        String NormalTakeCah = "0201";
        //T+0
        String FastTakeCah = "0202";
        //卡卡转账
        String TransferCard = "0301";
        //加油卡
        String FuelCard = "0302";
        //信用卡还款
        String CreditCard = "0303";
        //游戏充值
        String GameRecharge = "0304";
        //礼品卡充值
        String GiftRecharge = "0305";
        //手机充值
        String PhoneRecharge = "0306";
        //水电煤缴费
        String LifeRecharge = "0307";
        //即时到
        String QuickPay = "04";
        //支付宝扫一扫
        String AliPayScan = "0501";
        //支付宝付款码
        String AliPayCode = "0502";
        //微信扫一扫
        String WeixinPayScan = "0503";
        //微信付款码
        String WeixinPayCode = "0504";
    }

    /**
     * 标签类型 : 0 - RFID, 1 - 二维码, 2 - 数字码, 3 - 条码
     */
    public static interface TagType {
        int rfid = 0;
        int two_dimension = 1;
        int number_code = 2;
        int bar_code = 3;
    }

    /**
     * 扫码支付 渠道类型：支付宝取值-ALIPAY  微信取值-WEIXIN
     */
    public static interface ChannelType {
        String ALIPAY = "ALIPAY";
        String WEIXIN = "WEIXIN";
    }

    /**
     * 扫码支付支付场景：
     * 扫码：bar_code
     * 声波：wave_code
     */
    public static interface Scene {
        String BAR_CODE = "bar_code";
        String WAVE_CODE = "wave_code";
    }

}
